package cn.midas.basic.config;

import cn.midas.basic.interceptor.LonginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;
/**
* @Description: 登录拦截器配置类
* @Author: Mr.She
* @Version: 1.0
* @Date:
*/
@Configuration//表示此类为配置类
public class LoginConfig implements WebMvcConfigurer {
    @Autowired
    private LonginInterceptor loginInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginInterceptor)
                .addPathPatterns("/**")
                .excludePathPatterns("/fastDfs/**",
                        "/graphCode/**",
                        "/login/**",
                        "/user/register/**",
                        "/shop/settlement"

                        );


    }
}
